<template>
	<div>
		<bpmn-model
		v-loading="bpmnModelLoading"
		:modelData="form"
		@save="saveModel"></bpmn-model>
	</div>
</template>

<script>
	import bpmnModel from '@/components/BpmnModeler/index'
	import {saveProcessModel} from '@/api/process/model.js'
	export default{
		name:'edit',
		components:{bpmnModel},
		data(){
			return{
				form : this.$route.query,
				bpmnModelLoading:false
			} 
		},
		computed:{
			
		},
		methods:{
			saveModel(modelData){
				console.log(modelData)
				this.bpmnModelLoading=true
				saveProcessModel(modelData).then(response=>{
					this.msgSuccess(response.msg)
					this.bpmnModelLoading=false
				})
			}
		}
	}
	
</script>


